/*
 * constants.h
 *
 *  Created on: Oct 21, 2010
 *      Author: sanjeev
 */

#ifndef CONSTANTS_H_
#define CONSTANTS_H_

#define PFF std::pair<double,double>
#define TFFF std::pair<double,PFF>
#define VECTOR std::vector<double>
#define MATRIX std::vector<VECTOR>
#define CELL_RESOLUTION 0.1
#define INV -987654321
#define INF 987654321
#define MILLION 100000
#define PI M_PI
#define RAND1 ((double)rand()/(double)RAND_MAX)

#define PII std::pair<int,int>
#define DD std::pair<double,double>
#define PIII std::pair<int,PII>
#define TFII std::pair<double,PII>
#define DDII std::pair<DD,PII>
#define PRQ std::priority_queue<DDII,std::vector<DDII>,std::greater<DDII> >
#define PII_VECTOR std::vector<PII>
#define DDD std::pair<DD,double>
#define BINS std::map<DDD,int>

#define ANGLE(theta) std::min(std::min(theta,2*PI-theta),std::max(theta,2*PI+theta))


#endif /* CONSTANTS_H_ */

#include <cmath>
#include <fstream>
#include <iostream>
#include <cstdlib>
#include <utility>
#include <vector>
#include <queue>
#include <map>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <functional>
#include <iterator>
#include <numeric>

#include <std_msgs/Int8.h>
#include <std_msgs/Int32.h>

#include <stdio.h>

#include <tf/transform_datatypes.h>
#include <tf/transform_listener.h>
#include <tf/transform_broadcaster.h>

#include <ros/ros.h>
#include <nav_msgs/GetMap.h>
#include <nav_msgs/Odometry.h>

#include <sensor_msgs/LaserScan.h>
#include <sensor_msgs/RegionOfInterest.h>
#include <visualization_msgs/Marker.h>

#include <geometry_msgs/PoseArray.h>
#include <geometry_msgs/Pose.h>
#include <geometry_msgs/Pose2D.h>
#include <geometry_msgs/Point.h>
#include <geometry_msgs/Quaternion.h>
#include <geometry_msgs/PoseWithCovariance.h>
#include <geometry_msgs/PoseWithCovarianceStamped.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/PointStamped.h>
#include <geometry_msgs/PoseArray.h>

#include <boost/thread/thread.hpp>
#include <boost/random.hpp>

typedef std::vector<signed char> map_data_type;

typedef geometry_msgs::PoseWithCovarianceStamped::ConstPtr InitialPoseEstimate;
typedef nav_msgs::OccupancyGrid Map;
typedef VECTOR WeightsForPoses;
typedef MATRIX ObstacleCostMap;
typedef DD STLPose2D;
typedef DDD STLPose;

#define WALL 100
#define SPACE 0
#define NETHER -1
#define OBSTACLE 1
